/***    
request.globalRequest(url,请求方式,obj数据,123,true单,true 多array)url, method, data, power, isUpload, isFiles
1===没登录前的请求头
2===携带请求头token
3===刷新token
***/
import request from '@/util/request/request.ts'
const apiGoods = {}
// 商品列表
apiGoods.getGoodsList = (data) => request.globalRequest({
	url: `/mobile/user/gooods/getGoodsList`,
	method: 'POST',
	data,
	power: 2
})
// 商品列表详情
apiGoods.getGoodsDetail = (id) => request.globalRequest({
	url: `/mobile/user/gooods/getGoodsDetail/` + id,
	method: 'get',
	power: 2
})
// 获取品牌列表
apiGoods.getBrandList = (data) => request.globalRequest({
	url: `/mobile/select/getBrandList`,
	method: 'post',
	data,
	power: 2
})
// 获取商品分类列表
apiGoods.getGoodstypeList = (data, brandId, mobileType) => request.globalRequest({
	url: `/mobile/select/getGoodstypeList?brandId=${brandId}&mobileType=${mobileType}`,
	method: 'post',
	data,
	power: 2
})
// 获取报单商品列表
apiGoods.getOrderGoodsList = (data) => request.globalRequest({
	url: `/mobile/new/order/goods`,
	method: 'post',
	data,
	power: 2
})
//获取我的报单商品列表
apiGoods.getUserOrderGoodsList = (data) => request.globalRequest({
	url: `/mobile/user/gooods/getUserOrderGoodsList`,
	method: 'post',
	data,
	power: 2
})
//根据商品ID取商品参数
apiGoods.getGoodsParamField = (goodsId) => request.globalRequest({
	url: `/mobile/user/gooods/getGoodsParamField/` + goodsId,
	method: 'get',
	power: 2
})

apiGoods.getAllGoodClassify = (mobileType) => request.globalRequest({
	url: `/mobile/select/getGoodsTypes?mobileType=${mobileType}`,
	method: 'get',
	power: 2
})

export default apiGoods